- show_counter = local_assigns.fetch(:show_counter, false)
- subtitle = local_assigns.fetch(:subtitle, nil)

= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-py-0' }, header_options: { class: "gl-text-subtle gl-flex" }) do |c|
  - c.with_header do
    .gl-grow-2
      .gl-flex.gl-flex-col.gl-text-default
        = title
        .gl-text-subtle.gl-text-sm
          = subtitle
    .gl-ml-3.gl-shrink-0.gl-font-bold.gl-whitespace-nowrap.gl-text-subtle
      - if show_counter
        %span
          = sprite_icon(milestone_work_items_icon, css_class: 'gl-align-text-bottom')
          = number_with_delimiter(issuables.length)
      = render_if_exists "shared/milestones/issuables_weight", issuables: issuables
  - c.with_body do
    - class_prefix = dom_class(issuables).pluralize
    %ul{ class: "content-list milestone-#{class_prefix}-list", id: "#{class_prefix}-list-#{id}" }
      = render partial: 'shared/milestones/issuable',
              collection: issuables,
              as: :issuable,
              locals: { show_project_name: show_project_name }
